import {AxiosRequestConfig , AxiosResponse} from 'axios'
interface EhRequestInterceptors<T = AxiosResponse> {
  //请求拦截
  requestInterceptor?: (config: AxiosRequestConfig) => AxiosRequestConfig
  //请求失败拦截
  requestInterceptorCatch?: (err: any) => any
  //响应拦截
  responseInterceptor?: (config: T) => T
  //响应失败拦截
  responseInterceptorCatch?: (err: any) => any
}
interface EhRequestConfig<T = AxiosResponse> extends AxiosRequestConfig {
  interceptors?: EhRequestInterceptors<T>
  showLoading?: boolean
}

export {EhRequestConfig , EhRequestInterceptors}